package com.lcs.springcloud.service;

import com.lcs.springcloud.dao.StockDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class StockService {
     @Autowired
     StockDao stockDao;

    public String updateStock(String product_id) {
        try {
            stockDao.updateStock(product_id);
            return "扣减库存成功";
        }catch (Exception e){
            return "更新库存失败";
        }
    }
}
